package me.monster.smarttraffic.tool;

import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.bumptech.glide.load.resource.bitmap.CircleCrop;
import com.bumptech.glide.request.RequestOptions;

/**
 * @description
 * @author: Created jiangjiwei in 2020-02-11 17:05
 */
public class ImageLoader {

    public static void loadAvatar(String url, ImageView imageView) {
        Glide.with(imageView)
                .asBitmap()
                .load(url)
                .apply(RequestOptions.bitmapTransform(new CircleCrop()))
                .into(imageView);
    }
}
